function List(props) {
    return <div>
        {
            props.list.map(item => <div key={item.name}>
                {item.name}
            </div>)
        }
    </div>
}

function App() {
    const list = [{ name: 'admin' }, { name: 'lucy' }, { name: '蔡徐坤' }];

    return <div>
        <List list={list} />
    </div>;
}

ReactDOM.createRoot(document.querySelector('#root')).render(
    <App />
);